import request from '@/utils/http'

// 饮食字典列表
export const query_all_food = () => {
  return request.get({
    url: '/api/diet/dict/all/dict'
    // data: params
  })
}
// 查看个人饮食
export const query_get_food = (params: any) => {
  return request.get({
    url: '/api/diet/info/get/info/' + params.empi + '/' + params.date
    // data: params
  })
}
// 近一个月饮食
export const query_mouth_food = (params: any) => {
  return request.get({
    url: '/api/diet/info/get/' + params.empi + '/' + params.start + '/' + params.end
    // data: params
  })
}
// 个人饮食详情查看带搜索
export const search_food = (params: any) => {
  return request.get({
    url: '/api/diet/dict/get/' + params
    // data: params
  })
}
// 新增饮食
export const save_food = (params: any) => {
  return request.post({
    url: '/api/diet/info/save',
    data: params
  })
}
// 新增饮食
export const update_food = (params: any) => {
  return request.post({
    url: '/api/diet/info/update',
    data: params
  })
}
// 删除单个食物
export const delete_food = (params: any) => {
  return request.get({
    url: '/api/diet/info/delete/' + params
    // data: params
  })
}
